package com.yehui.spring.aop.annotation;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

/**
 * @author 业徽
 * @date 2021/7/27
 */
@EnableAspectJAutoProxy(proxyTargetClass = true)
@Component
public class AnnotationAopDemo {

    public static void main(String[] args) {

        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext("com.yehui.spring.aop.annotation");

        final People people = applicationContext.getBean(People.class);

        people.o();
        people.haha();

    }

}
